package com.jyu.controller;


import com.jyu.utils.R;
import com.jyu.service.ManagerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping("/managers")
public class LoginController {
    @Autowired
    private ManagerService managerService;

    @PostMapping("/login")
    public R login(HttpServletRequest request, @RequestParam String name, @RequestParam String password){
        return managerService.login(request,name,password);
    }
}
